import axios from "axios";
const $http = axios.create({
  baseURL: "/mock",
  timeout: 5000,
  headers: {
    "Content-Type": "application/json;charset=utf-8",
  },
});
$http.interceptors.request.use(
  (config) => {
    return config;
  },
  (error) => {
    return Promise.reject(error);
  }
);
$http.interceptors.response.use(
  (res) => {
    return res.data;
  },
  (error) => {
    return Promise.reject(error);
  }
);
export default $http;
